/*
 *  data_structrue/tree/huffman/huff.h
 *
 *  (C) 2011 Harry Wei
 */

/*
 * The header file for 
 * data_structure/tree/huffman/main.c.
 */

#ifndef _HUFF_H
#define _HUFF_H

#define DEBUG		(1)
#define LC_NODE_NUM	(5)
#define NODE_NUM 	(2 * LC_NODE_NUM - 1) 

struct huffman {
	uint32_t weight;
	uint32_t parent;
	uint32_t lchild;
	uint32_t rchild;
};

int creat_huffman(struct huffman *huff, int *frequency);
int huff_select(struct huffman *huf, int temp, 
		int *get_lchild, int *get_rchild);

#endif
